Optimal. Leaf size=222 \[ -\frac {b f^2 p q \log \left (\frac {f g-e h}{h (e+f x)}+1\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{h (f g-e h)^2}-\frac {b f p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(g+h x) (f g-e h)^2}-\frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}+\frac {b^2 f^2 p^2 q^2 \text {Li}_2\left (-\frac {f g-e h}{h (e+f x)}\right )}{h (f g-e h)^2}+\frac {b^2 f^2 p^2 q^2 \log (g+h x)}{h (f g-e h)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.82, antiderivative size = 257, normalized size of antiderivative = 1.16, number of steps used = 10, number of rules used = 10, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {2398, 2411, 2347, 2344, 2301, 2317, 2391, 2314, 31, 2445} \[ -\frac {b^2 f^2 p^2 q^2 \text {PolyLog}\left (2,-\frac {h (e+f x)}{f g-e h}\right )}{h (f g-e h)^2}+\frac {f^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (f g-e h)^2}-\frac {b f^2 p q \log \left (\frac {f (g+h x)}{f g-e h}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{h (f g-e h)^2}-\frac {b f p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(g+h x) (f g-e h)^2}-\frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}+\frac {b^2 f^2 p^2 q^2 \log (g+h x)}{h (f g-e h)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 2301
Rule 2314
Rule 2317
Rule 2344
Rule 2347
Rule 2391
Rule 2398
Rule 2411
Rule 2445
Rubi steps
\begin {align*} \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x)^3} \, dx &=\operatorname {Subst}\left (\int \frac {\left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^2}{(g+h x)^3} \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}+\operatorname {Subst}\left (\frac {(b f p q) \int \frac {a+b \log \left (c d^q (e+f x)^{p q}\right )}{(e+f x) (g+h x)^2} \, dx}{h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}+\operatorname {Subst}\left (\frac {(b p q) \operatorname {Subst}\left (\int \frac {a+b \log \left (c d^q x^{p q}\right )}{x \left (\frac {f g-e h}{f}+\frac {h x}{f}\right )^2} \, dx,x,e+f x\right )}{h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}-\operatorname {Subst}\left (\frac {(b p q) \operatorname {Subst}\left (\int \frac {a+b \log \left (c d^q x^{p q}\right )}{\left (\frac {f g-e h}{f}+\frac {h x}{f}\right )^2} \, dx,x,e+f x\right )}{f g-e h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\operatorname {Subst}\left (\frac {(b f p q) \operatorname {Subst}\left (\int \frac {a+b \log \left (c d^q x^{p q}\right )}{x \left (\frac {f g-e h}{f}+\frac {h x}{f}\right )} \, dx,x,e+f x\right )}{h (f g-e h)},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {b f p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(f g-e h)^2 (g+h x)}-\frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}-\operatorname {Subst}\left (\frac {(b f p q) \operatorname {Subst}\left (\int \frac {a+b \log \left (c d^q x^{p q}\right )}{\frac {f g-e h}{f}+\frac {h x}{f}} \, dx,x,e+f x\right )}{(f g-e h)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\operatorname {Subst}\left (\frac {\left (b f^2 p q\right ) \operatorname {Subst}\left (\int \frac {a+b \log \left (c d^q x^{p q}\right )}{x} \, dx,x,e+f x\right )}{h (f g-e h)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\operatorname {Subst}\left (\frac {\left (b^2 f p^2 q^2\right ) \operatorname {Subst}\left (\int \frac {1}{\frac {f g-e h}{f}+\frac {h x}{f}} \, dx,x,e+f x\right )}{(f g-e h)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {b f p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(f g-e h)^2 (g+h x)}+\frac {f^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (f g-e h)^2}-\frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}+\frac {b^2 f^2 p^2 q^2 \log (g+h x)}{h (f g-e h)^2}-\frac {b f^2 p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac {f (g+h x)}{f g-e h}\right )}{h (f g-e h)^2}+\operatorname {Subst}\left (\frac {\left (b^2 f^2 p^2 q^2\right ) \operatorname {Subst}\left (\int \frac {\log \left (1+\frac {h x}{f g-e h}\right )}{x} \, dx,x,e+f x\right )}{h (f g-e h)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {b f p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(f g-e h)^2 (g+h x)}+\frac {f^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (f g-e h)^2}-\frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}+\frac {b^2 f^2 p^2 q^2 \log (g+h x)}{h (f g-e h)^2}-\frac {b f^2 p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac {f (g+h x)}{f g-e h}\right )}{h (f g-e h)^2}-\frac {b^2 f^2 p^2 q^2 \text {Li}_2\left (-\frac {h (e+f x)}{f g-e h}\right )}{h (f g-e h)^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.47, size = 316, normalized size = 1.42 \[ -\frac {\frac {2 b p q \left (h (e+f x) \log (e+f x) (e h-f (2 g+h x))+f (g+h x) \left (f (g+h x) \log \left (\frac {f (g+h x)}{f g-e h}\right )+h (e+f x)\right )\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )-b p q \log (e+f x)\right )}{(f g-e h)^2}+\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )-b p q \log (e+f x)\right )^2+\frac {b^2 p^2 q^2 \left (2 f^2 (g+h x)^2 \text {Li}_2\left (\frac {h (e+f x)}{e h-f g}\right )-2 f^2 (g+h x)^2 \log \left (\frac {f (g+h x)}{f g-e h}\right )+h (e+f x) \log ^2(e+f x) (e h-f (2 g+h x))+2 f (g+h x) \log (e+f x) \left (f (g+h x) \log \left (\frac {f (g+h x)}{f g-e h}\right )+h (e+f x)\right )\right )}{(f g-e h)^2}}{2 h (g+h x)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.68, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {b^{2} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{2} + 2 \, a b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a^{2}}{h^{3} x^{3} + 3 \, g h^{2} x^{2} + 3 \, g^{2} h x + g^{3}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a\right )}^{2}}{{\left (h x + g\right )}^{3}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.35, size = 0, normalized size = 0.00 \[ \int \frac {\left (b \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right )+a \right )^{2}}{\left (h x +g \right )^{3}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ a b f p q {\left (\frac {f \log \left (f x + e\right )}{f^{2} g^{2} h - 2 \, e f g h^{2} + e^{2} h^{3}} - \frac {f \log \left (h x + g\right )}{f^{2} g^{2} h - 2 \, e f g h^{2} + e^{2} h^{3}} + \frac {1}{f g^{2} h - e g h^{2} + {\left (f g h^{2} - e h^{3}\right )} x}\right )} - \frac {1}{2} \, b^{2} {\left (\frac {\log \left ({\left ({\left (f x + e\right )}^{p}\right )}^{q}\right )^{2}}{h^{3} x^{2} + 2 \, g h^{2} x + g^{2} h} - 2 \, \int \frac {e h q^{2} \log \relax (d)^{2} + 2 \, e h q \log \relax (c) \log \relax (d) + e h \log \relax (c)^{2} + {\left (f h q^{2} \log \relax (d)^{2} + 2 \, f h q \log \relax (c) \log \relax (d) + f h \log \relax (c)^{2}\right )} x + {\left (f g p q + 2 \, e h q \log \relax (d) + 2 \, e h \log \relax (c) + {\left (f h p q + 2 \, f h q \log \relax (d) + 2 \, f h \log \relax (c)\right )} x\right )} \log \left ({\left ({\left (f x + e\right )}^{p}\right )}^{q}\right )}{f h^{4} x^{4} + e g^{3} h + {\left (3 \, f g h^{3} + e h^{4}\right )} x^{3} + 3 \, {\left (f g^{2} h^{2} + e g h^{3}\right )} x^{2} + {\left (f g^{3} h + 3 \, e g^{2} h^{2}\right )} x}\,{d x}\right )} - \frac {a b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )}{h^{3} x^{2} + 2 \, g h^{2} x + g^{2} h} - \frac {a^{2}}{2 \, {\left (h^{3} x^{2} + 2 \, g h^{2} x + g^{2} h\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\left (a+b\,\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )\right )}^2}{{\left (g+h\,x\right )}^3} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (a + b \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}\right )^{2}}{\left (g + h x\right )^{3}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________